Speech recognition method, speech wakeup apparatus, speech recognition apparatus, and terminal

ABSTRACT

Embodiments of the present invention provide a speech recognition method and a terminal. The method includes: listening, by a speech wakeup apparatus, to speech information in a surrounding environment; when determining that the speech information obtained by listening matches a speech wakeup model, buffering, by the speech wakeup apparatus, speech information, of first preset duration, obtained by listening, and sending a trigger signal for triggering enabling of a speech recognition apparatus, where the trigger signal is used to instruct the speech recognition apparatus to read and recognize the speech information buffered by the speech wakeup apparatus; and recognizing first speech information buffered by the speech wakeup apparatus and the second speech information obtained by listening, to obtain a recognition result.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 15/729,097, filed on Oct. 10, 2017, which is a continuation of International Application No. PCT/CN2015/076342, filed on Apr. 10, 2015, the disclosure of which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present invention relates to the field of mobile communications technologies, and in particular, to a speech recognition method, a speech wakeup apparatus, a speech recognition apparatus, and a terminal.

BACKGROUND

At present, with increasing popularity of a mobile hand-held terminal, in particular, a mobile phone, touchscreen technologies are also becoming increasingly mature. Although the touchscreen technologies facilitate an operation of a user, multiple touch steps need to be performed to complete call interaction, and a call may be missed when the user is driving or is not convenient to perform a touch.

Therefore, functions such as making a call or sending an SMS message based on speech recognition technologies emerge. In addition, at present, as a new and important user interaction technology, speech recognition is increasingly widely applied to mobile terminals.

However, current services such as making a call or sending an SMS message based on the speech recognition technologies can be implemented only when the touchscreen technologies are used cooperatively.

SUMMARY

Embodiments of the present invention provide a speech recognition method, a speech wakeup apparatus, a speech recognition apparatus, and a terminal. A user needs to send only one instruction, and requirements of the user can be met. The user does not need a help of a touchscreen and does not need to enter multiple instructions either.

According to a first aspect, an embodiment of the present invention provides a speech recognition method, and the method includes:

-   -   listening, by a speech wakeup apparatus, to speech information         in a surrounding environment; and     -   when determining that the speech information obtained by         listening matches a speech wakeup model, buffering, by the         speech wakeup apparatus, speech information, of first preset         duration, obtained by listening, and sending a trigger signal         for triggering enabling of a speech recognition apparatus, where         the trigger signal is used to instruct the speech recognition         apparatus to read and recognize the speech information buffered         by the speech wakeup apparatus, after the speech recognition         apparatus is enabled.

With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining that the speech information obtained by listening matches a speech wakeup model includes:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, determining that the         speech information obtained by listening matches the speech         wakeup model.

With reference to the first aspect, in a second possible implementation manner of the first aspect, the determining that the speech information obtained by listening matches a speech wakeup model includes:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, extracting a voiceprint         feature in a speech signal obtained by listening, determining         that the extracted voiceprint feature matches a predetermined         voiceprint feature, and determining that the speech information         obtained by listening matches the speech wakeup model.

According to a second aspect, an embodiment of the present invention provides a speech recognition method, and the method includes:

-   -   receiving, by a speech recognition apparatus, a trigger signal         sent by a speech wakeup apparatus, where the trigger signal is         used to instruct the speech recognition apparatus to enable         itself and recognize first speech information buffered by the         speech wakeup apparatus;     -   after receiving the trigger signal, enabling, by the speech         recognition apparatus, itself and listening to second speech         information of second preset duration; and     -   recognizing the first speech information buffered by the speech         wakeup apparatus and the second speech information obtained by         listening, to obtain a recognition result.

With reference to the second aspect, in a first possible implementation manner of the second aspect, after the speech recognition apparatus obtains the recognition result, the method further includes:

-   -   performing, by the speech recognition apparatus, matching         between the obtained recognition result and pre-stored speech         instruction information; and     -   performing, by the speech recognition apparatus, an operation         corresponding to matched speech instruction information.

With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the method further includes:

-   -   when determining that the trigger signal is not received again         within third preset duration after the trigger signal is         received, automatically disabling, by the speech recognition         apparatus, itself.

According to a third aspect, an embodiment of the present invention provides a speech recognition method, and the method includes:

-   -   listening, by a speech wakeup apparatus, to speech information         in a surrounding environment; and     -   when determining that the speech information obtained by         listening matches a speech wakeup model, sending, by the speech         wakeup apparatus, a trigger signal for triggering enabling of a         speech recognition apparatus.

With reference to the third aspect, in a first possible implementation manner of the third aspect, the determining that the speech information obtained by listening matches a speech wakeup model includes:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, determining that the         speech information obtained by listening matches the speech         wakeup model.

With reference to the third aspect, in a second possible implementation manner of the third aspect, the determining that the speech information obtained by listening matches a speech wakeup model includes:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, extracting a voiceprint         feature in a speech signal obtained by listening, determining         that the extracted voiceprint feature matches a predetermined         voiceprint feature, and determining that the speech information         obtained by listening matches the speech wakeup model.

According to a fourth aspect, an embodiment of the present invention provides a speech recognition method, and the method includes:

-   -   receiving, by a speech recognition apparatus, a trigger signal         sent by a speech wakeup apparatus;     -   enabling, by the speech recognition apparatus after receiving         the trigger signal, itself and sending a speech prompt         instruction to a user; and     -   recording, by the speech recognition apparatus, a speech signal         entered by the user according to the speech prompt instruction,         and performing recognition on the speech signal to obtain a         recognition result.

According to a fifth aspect, an embodiment of the present invention further provides a speech wakeup apparatus, and the apparatus includes:

-   -   a listening module, configured to listen to speech information         in a surrounding environment;     -   a determining module, configured to determine whether the speech         information obtained by listening by the listening module         matches a speech wakeup model;     -   a buffer module, configured to: when the determining module         determines that the speech information obtained by listening by         the listening module matches the speech wakeup model, buffer         speech information, of first preset duration, obtained by         listening by the listening module; and     -   a sending module, configured to send a trigger signal for         triggering enabling of a speech recognition apparatus, where the         trigger signal is used to instruct the speech recognition         apparatus to read and recognize the speech information buffered         by the speech wakeup apparatus, after the speech recognition         apparatus is enabled.

With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the determining module is specifically configured to: when determining that the speech information obtained by listening matches predetermined wakeup speech information, determine that the speech information obtained by listening matches the speech wakeup model.

With reference to the fifth aspect, in a second possible implementation manner of the fifth aspect, the apparatus further includes:

-   -   an extraction module, configured to: when the determining module         determines that the speech information obtained by listening         matches predetermined wakeup speech information, extract a         voiceprint feature in a speech signal obtained by listening;         where     -   the determining module is further configured to: when         determining that the voiceprint feature extracted by the         extraction module matches a predetermined voiceprint feature,         determine that the speech information obtained by listening         matches the speech wakeup model.

According to a sixth aspect, an embodiment of the present invention provides a speech recognition apparatus, including:

-   -   a receiving module, configured to receive a trigger signal sent         by a speech wakeup apparatus, where the trigger signal is used         to instruct the speech recognition apparatus to enable itself         and recognize first speech information buffered by the speech         wakeup apparatus;     -   a listening module, configured to: after the receiving module         receives the trigger signal, enable itself and listen to second         speech information of second preset duration; and     -   a recognition module, configured to recognize the first speech         information buffered by the speech wakeup apparatus and the         second speech information obtained by listening by the listening         module to obtain a recognition result.

With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the apparatus further includes:

-   -   a matching module, configured to perform matching between the         recognition result obtained after the recognition module         performs recognition and pre-stored speech instruction         information; and     -   an execution module, configured to perform an operation         corresponding to matched speech instruction information.

With reference to the sixth aspect or the first possible implementation manner of the sixth aspect, in a second possible implementation manner of the sixth aspect, the apparatus further includes:

-   -   a disabling module, configured to: when the trigger signal is         not received again within third preset duration after the         trigger signal is received, disable the speech recognition         module.

According to a seventh aspect, an embodiment of the present invention provides a speech wakeup apparatus, including:

-   -   a listening module, configured to listen to speech information         in a surrounding environment;     -   a determining module, configured to determine whether the speech         information obtained by listening matches a speech wakeup model;         and     -   a sending module, configured to: when the determining module         determines that the speech information obtained by listening         matches the speech wakeup model, send a trigger signal for         triggering enabling of a speech recognition apparatus.

With reference to the seventh aspect, in a first possible implementation manner of the seventh aspect, the determining module is specifically configured to: when determining that the speech information obtained by listening matches predetermined wakeup speech information, determine that the speech information obtained by listening matches the speech wakeup model.

With reference to the seventh aspect, in a second possible implementation manner of the seventh aspect, the apparatus further includes:

-   -   an extraction module, configured to: when the determining module         determines that the speech information obtained by listening         matches predetermined wakeup speech information, extract a         voiceprint feature in a speech signal obtained by listening;         where     -   the determining module is specifically configured to: when         determining that the extracted voiceprint feature matches a         predetermined voiceprint feature, determine that the speech         information obtained by listening matches the speech wakeup         model.

According to an eighth aspect, an embodiment of the present invention provides a speech recognition apparatus, including:

-   -   a receiving module, configured to receive a trigger signal sent         by a speech wakeup apparatus;     -   a sending module, configured to: after the receiving module         receives the trigger signal, enable itself and send a speech         prompt instruction to a user; and     -   a processing module, configured to record a speech signal         entered by the user according to the speech prompt instruction,         and recognize the speech signal to obtain a recognition result.

According to a ninth aspect, an embodiment of the present invention provides a terminal, including:

-   -   a speech wakeup apparatus and a speech recognition apparatus;         where     -   the speech wakeup apparatus is configured to: listen to speech         information in a surrounding environment; when determining that         the speech information obtained by listening matches a speech         wakeup model, buffer first speech information obtained by         listening within first preset duration, and send a trigger         signal for triggering enabling of the speech recognition         apparatus; and     -   the speech recognition apparatus is configured to: after         receiving the trigger signal sent by the speech wakeup         apparatus, enable itself and listen to second speech information         within second preset duration, and recognize the first speech         information buffered by the speech wakeup apparatus and the         second speech information obtained by listening to obtain a         recognition result.

With reference to the ninth aspect, in a first possible implementation manner of the ninth aspect, the speech wakeup apparatus is a digital signal processor DSP.

With reference to the ninth aspect or the first possible implementation manner of the ninth aspect, in a second possible implementation manner of the ninth aspect, the speech recognition apparatus is an application processor AP.

By using solutions provided in the embodiments of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, a speech wakeup apparatus buffers speech information obtained by listening, and a speech recognition apparatus listens to second speech information after being enabled, and recognizes buffered first speech information and the second speech information, so that a loss of partial speech information sent by the user before the speech recognition apparatus is enabled can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present invention;

FIG. 2 is a flowchart of a speech recognition method according to an embodiment of the present invention;

FIG. 3 is another flowchart of a speech recognition method according to an embodiment of the present invention;

FIG. 4 is still another flowchart of a speech recognition method according to an embodiment of the present invention;

FIG. 5 is yet still another flowchart of a speech recognition method according to an embodiment of the present invention;

FIG. 6 is a schematic diagram of a speech wakeup apparatus according to an embodiment of the present invention;

FIG. 7 is a schematic diagram of a speech recognition apparatus according to an embodiment of the present invention;

FIG. 8 is another schematic diagram of a speech wakeup apparatus according to an embodiment of the present invention;

FIG. 9 is another schematic diagram of a speech recognition apparatus according to an embodiment of the present invention; and

FIG. 10 is a schematic diagram of a speech recognition method according to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

Embodiments of the present invention provide a speech recognition method, a speech wakeup apparatus, a speech recognition apparatus, and a terminal. A user needs to send only one instruction, and requirements of the user can be met. The user does not need a help of a touchscreen and does not need to enter multiple instructions either. The method and the apparatus are based on a same inventive concept. Because principles for resolving a problem by the method and the apparatus are similar, implementation of the terminal, the apparatus, and the method may refer to each other, and repeated description is not provided.

An embodiment of the present invention provides a terminal. As shown in FIG. 1 , the terminal includes a speech wakeup apparatus 101 and a speech recognition apparatus 102.

The speech wakeup apparatus 101 may be implemented by using a digital signal processor (Digital Signal Processor, DSP for short). The speech recognition apparatus 102 may be implemented by using an application processor (Application Processor, AP for short). The speech recognition apparatus 102 may be further implemented by using a central processing unit (Central Process Unit, CPU for short).

The speech wakeup apparatus 101 is configured to: listen to speech information in a surrounding environment; when determining that the speech information obtained by listening matches a speech wakeup model, buffer first speech information obtained by listening within first preset duration, and send a trigger signal for triggering enabling of the speech recognition apparatus.

The speech recognition apparatus 102 is configured to: after receiving the trigger signal sent by the speech wakeup apparatus, enable itself and listen to second speech information within second preset duration, and recognize the first speech information buffered by the speech wakeup apparatus and the second speech information obtained by listening, to obtain a recognition result.

Optionally, when determining that the trigger signal is not received again within third preset duration after the trigger signal is received, the speech recognition apparatus 102 automatically disables itself.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, a speech wakeup apparatus buffers speech information obtained by listening, and a speech recognition apparatus listens to second speech information after being enabled, and recognizes buffered first speech information and the second speech information, so that a loss of partial speech information sent by the user before the speech recognition apparatus is enabled can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up.

Specifically, generally after a DSP initiates a trigger signal, after being enabled, an AP enables a record channel to perform recording. Generally, the recording is started after the AP is enabled. However, in this solution, before the AP is enabled, the DSP starts to perform recording and buffering when receiving wakeup information. After being enabled, the AP continues to perform recording to obtain speech information, and then recognizes speech information read from a DSP buffer and the speech information obtained after the AP is enabled. In a One Shot scenario, there is a time difference from waking up the DSP to sending an instruction by the DSP. If recording is performed after the AP is enabled, only speech information after the AP is enabled can be recorded, and speech information within the foregoing time difference is lost. However, if recording is started and buffered when the DSP is woken up, the speech information within the foregoing time difference can be obtained.

For example, a time point for starting to speak a wakeup word is t0, a time point for finishing speaking the wakeup word is t1, a time point for starting to speak a command word is t2, and a time point for enabling the AP is t3. The buffer includes speech information from t0 to t3. However, if recording is performed only when the AP is enabled, only speech information after t3 can be recorded, and speech information from t0 to t3 cannot be recorded. Therefore, in the solution provided in this embodiment of the present invention, speech information after speech information used for wakeup can be obtained, and a speech information loss is avoided, thereby improving speech recognition.

Optionally, the following manners may be specifically used to determine that the speech information obtained by listening matches the speech wakeup model:

-   -   A first implementation manner:     -   when the speech information obtained by listening matches         predetermined wakeup speech information, the speech information         obtained by listening matches the speech wakeup model.

A user can set wakeup speech information in the speech wakeup apparatus according to a prompt in advance, for example: Hi, little E. Alternatively, wakeup speech information is preset in a terminal at the time of factory delivery. When detecting speech information in a surrounding environment, the speech wakeup apparatus compares the speech information with stored wakeup speech information. If the two are the same, the speech information matches the speech wakeup model, and a trigger instruction is sent to the speech recognition apparatus 102; or if the two are different, the speech wakeup apparatus 101 may discard currently detected speech information, and continue to perform detection and determining work.

A second implementation manner:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, a voiceprint feature in         a speech signal obtained by listening is extracted, the         extracted voiceprint feature matches a predetermined voiceprint         feature, and the speech information obtained by listening         matches the speech wakeup model.

The voiceprint feature includes one or more of the following features:

-   -   an acoustic parameter that reflects the voiceprint feature, such         as a pitch contour, a linear prediction coefficient, a spectral         envelope parameter, a harmonic energy ratio, a resonant peak         frequency and its bandwidth, a cepstrum (also referred to as a         power cepstrum), or a Mel-frequency cepstrum coefficient (Mel         Frequency Cepstrum Coefficient, MFCC for short). This embodiment         is not limited to the foregoing mentioned voiceprint feature         parameters.

A setting apparatus may be further included in this embodiment of the present invention. A voiceprint feature of a user is pre-extracted and stored into the speech wakeup apparatus. For example, the user may record speech information inside a setting module according to a prompt, then extract a voiceprint feature, and store the extracted voiceprint feature into the speech wakeup apparatus.

By using the solutions provided in this embodiment of the present invention, a voiceprint feature is added into a wakeup model, so that noise in a surrounding environment and speech input of other users can be filtered out, and a speech wakeup apparatus can provide reliable security for a user.

Optionally, after the speech recognition apparatus obtains the recognition result, the speech recognition apparatus performs matching between the obtained recognition result and pre-stored speech instruction information; the speech recognition apparatus controls execution of an operation corresponding to matched speech instruction information.

The speech instruction information is pre-stored in the speech recognition apparatus. The speech recognition apparatus includes multiple pieces of speech instruction information.

An execution module performing an operation corresponding to speech instruction information may be further included in this embodiment of the present invention. The speech recognition apparatus may send an execution instruction to the execution module that performs the operation corresponding to the speech instruction information. For example, a loudspeaker, a light-emitting apparatus, or the like is included.

For example, when detecting that speech information in a surrounding environment satisfies the wakeup model, a speech wakeup module buffers first speech information of first preset duration, such as 2s, triggers a speech recognition module to enable itself and listen to second speech information, then recognizes the buffered first speech information and the second speech information, and fuzzily compares a recognition result with the speech instruction information to determine whether the speech information matches one piece of the speech instruction information. For example, the speech instruction information includes speech instruction information that instructs to play a ringtone or MP3, such as “Play a ringtone” or “Play MP3”; or includes speech instruction information that instructs to make an answer, such as “Where are you?”; or includes speech instruction information that instructs to light up a camera flash, such as “turn on a camera flash”.

A terminal device such as a mobile phone may be searched for by using the solution provided in this embodiment of the present invention. At home, generally the mobile phone is placed randomly, and it takes some time to find the mobile phone if needed for use. By using the solution provided in this embodiment of the present invention, “Hello, little E, where are you?” can be spoken out. Therefore, a speech wakeup module in the mobile phone detects the speech information, and performs matching between the speech information and a speech wakeup model (for example, wakeup speech information is “Hello, little E”). When the speech information matches the speech wakeup model, the speech information is buffered into a Buffer, and a trigger signal is sent to a speech recognition module. The speech recognition module enables itself and starts to listen to speech information, then recognizes the buffered speech information and the speech information obtained by listening, to obtain a recognition result (a text result is “Hello, little E, where are you”), and performs matching between the text result and speech instruction information. For example, if speech instruction information that matches the “Hello, little E, where are you” is play MP3, MP3 music is played to prompt a user.

A call may be made by using the solution provided in this embodiment of the present invention. Regardless of whether a mobile phone is in a standby state or in a screen-locked state, a speech wakeup module of the mobile phone is always in an enabled state, so that speech information sent by a user can be obtained by listening, for example, “Hello, little E, call little A”. Then, a call can be directly made, and any other operations are not needed.

An embodiment of the present invention further provides a speech recognition method. As shown in FIG. 2 , the method includes:

-   -   Step 201: A speech wakeup apparatus listens to speech         information in a surrounding environment.

Step 202: When determining that the speech information obtained by listening matches a speech wakeup model, the speech wakeup apparatus buffers speech information, of first preset duration, obtained by listening, and sends a trigger signal for triggering enabling of a speech recognition apparatus, where the trigger signal is used to instruct the speech recognition apparatus to read and recognize the speech information buffered by the speech wakeup apparatus, after the speech recognition apparatus is enabled.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, speech information obtained by listening is buffered, and a speech recognition apparatus is enabled and the speech recognition apparatus listens to speech information, and then recognizes the buffered speech information and the speech information obtained by listening, so that a loss of partial speech information can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up, and speech recognition is improved.

Optionally, the following manners may be specifically used to determine that the speech information obtained by listening matches the speech wakeup model:

-   -   A first implementation manner:     -   when the speech information obtained by listening matches         predetermined wakeup speech information, the speech information         obtained by listening matches the speech wakeup model.

A second implementation manner:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, a voiceprint feature in         a speech signal obtained by listening is extracted, the         extracted voiceprint feature matches a predetermined voiceprint         feature, and the speech information obtained by listening         matches the speech wakeup model.

An embodiment of the present invention further provides a speech recognition method. As shown in FIG. 3 , the method includes:

-   -   Step 301: A speech recognition apparatus receives a trigger         signal sent by a speech wakeup apparatus, where the trigger         signal is used to instruct the speech recognition apparatus to         enable itself and recognize first speech information buffered by         the speech wakeup apparatus.

Step 302: After receiving the trigger signal, the speech recognition apparatus is enabled and the speech recognition apparatus listens to second speech information of second preset duration.

Step 303: Recognize the first speech information buffered by the speech wakeup apparatus and the second speech information obtained by listening, to obtain a recognition result.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, speech information obtained by listening is buffered, and a speech recognition apparatus is enabled and the speech recognition apparatus listens to speech information, and then recognizes the buffered speech information and the speech information obtained by listening, so that a loss of partial speech information can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up, and speech recognition is improved.

Optionally, after the speech recognition apparatus obtains the recognition result, the method further includes:

-   -   performing, by the speech recognition apparatus, matching         between the obtained recognition result and pre-stored speech         instruction information; and     -   controlling, by the speech recognition apparatus, execution of         an operation corresponding to matched speech instruction         information.

Optionally, when determining that the trigger signal is not received again within third preset duration after the trigger signal is received, the speech recognition apparatus automatically disables itself.

An embodiment of the present invention further provides a speech recognition method. As shown in FIG. 4 , the method includes:

-   -   Step 401: A speech wakeup apparatus listens to speech         information in a surrounding environment.

Step 402: When determining that the speech information obtained by listening matches a speech wakeup model, the speech wakeup apparatus sends a trigger signal for triggering enabling of a speech recognition apparatus.

Optionally, the following manners may be specifically used to determine that the speech information obtained by listening matches the speech wakeup model:

-   -   A first implementation manner:     -   when the speech information obtained by listening matches         predetermined wakeup speech information, the speech information         obtained by listening matches the speech wakeup model.

A second implementation manner:

-   -   when the speech information obtained by listening matches         predetermined wakeup speech information, a voiceprint feature in         a speech signal obtained by listening is extracted, the         extracted voiceprint feature matches a predetermined voiceprint         feature, and the speech information obtained by listening         matches the speech wakeup model.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, speech information obtained by listening is buffered, and a speech recognition apparatus enables itself and listens to speech information, and then recognizes the buffered speech information and the speech information obtained by listening, so that a loss of partial speech information can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up, and speech recognition is improved.

An embodiment of the present invention further provides a speech recognition method. As shown in FIG. 5 , the method includes:

-   -   Step 501: A speech recognition apparatus receives a trigger         signal sent by a speech wakeup apparatus.     -   Step 502: After receiving the trigger signal, the speech         recognition apparatus enables itself and sends a speech prompt         instruction to a user.     -   Step 503: The speech recognition apparatus records a speech         signal entered by the user according to the speech prompt         instruction, and recognizes the speech signal to obtain a         recognition result.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state.

Optionally, after the speech recognition apparatus recognizes the speech signal to obtain the recognition result, the method further includes:

-   -   performing, by the speech recognition apparatus, matching         between the obtained recognition result and pre-stored speech         instruction information; and     -   controlling, by the speech recognition apparatus, execution of         an operation corresponding to matched speech instruction         information.

An embodiment of the present invention further provides a speech wakeup apparatus. As shown in FIG. 6 , the apparatus includes:

-   -   a listening module 601, configured to listen to speech         information in a surrounding environment;     -   a determining module 602, configured to determine whether the         speech information obtained by listening by the listening module         601 matches a speech wakeup model;     -   a buffer module 603, configured to: when the determining module         602 determines that the speech information obtained by listening         by the listening module 601 matches the speech wakeup model,         buffer speech information, of first preset duration, obtained by         listening by the listening module 601; and     -   a sending module 604, configured to send a trigger signal for         triggering enabling of a speech recognition apparatus, where the         trigger signal is used to instruct the speech recognition         apparatus to read and recognize the speech information buffered         by the speech wakeup apparatus, after the speech recognition         apparatus is enabled.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, speech information obtained by listening is buffered, and a speech recognition apparatus enables itself and listens to speech information, and then recognizes the buffered speech information and the speech information obtained by listening, so that a loss of partial speech information can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up, and speech recognition is improved.

Optionally, the determining module 602 is specifically configured to: when determining that the speech information obtained by listening matches predetermined wakeup speech information, determine that the speech information obtained by listening matches the speech wakeup model.

Optionally, the apparatus further includes:

-   -   an extraction module, configured to: when the determining module         602 determines that the speech information obtained by listening         matches predetermined wakeup speech information, extract a         voiceprint feature in a speech signal obtained by listening;         where     -   the determining module 602 is further configured to: when         determining that the voiceprint feature extracted by the         extraction module matches a predetermined voiceprint feature,         determine that the speech information obtained by listening         matches the speech wakeup model.

An embodiment of the present invention further provides a speech recognition apparatus. As shown in FIG. 7 , the apparatus includes:

-   -   a receiving module 701, configured to receive a trigger signal         sent by a speech wakeup apparatus, where the trigger signal is         used to instruct the speech recognition apparatus to enable         itself and recognize first speech information buffered by the         speech wakeup apparatus;

a listening module 702, configured to: after the receiving module 701 receives the trigger signal, enable itself and listen to second speech information of second preset duration; and

-   -   a recognition module 703, configured to recognize the first         speech information buffered by the speech wakeup apparatus and         the second speech information obtained by listening by the         listening module, to obtain a recognition result.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state.

Optionally, the apparatus further includes:

-   -   a matching module, configured to perform matching between the         recognition result obtained after the recognition module 703         performs recognition and pre-stored speech instruction         information; and     -   an execution module, configured to perform an operation         corresponding to matched speech instruction information.

Optionally, the apparatus further includes:

-   -   a disabling module, configured to: when the trigger signal is         not received again within third preset duration after the         receiving module receives the trigger signal, disable the speech         recognition module.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state. In addition, speech information obtained by listening is buffered, and a speech recognition apparatus enables itself and listens to speech information, and then recognizes the buffered speech information and the speech information obtained by listening, so that a loss of partial speech information can be avoided when the speech recognition apparatus starts to obtain speech information after being woken up, and speech recognition is improved.

An embodiment of the present invention further provides a speech wakeup apparatus. As shown in FIG. 8 , the apparatus includes:

-   -   a listening module 801, configured to listen to speech         information in a surrounding environment;     -   a determining module 802, configured to determine whether the         speech information obtained by listening matches a speech wakeup         model; and     -   a sending module 803, configured to: when the determining module         802 determines that the speech information obtained by listening         matches the speech wakeup model, send a trigger signal for         triggering enabling of a speech recognition apparatus.

Optionally, the determining module 802 is specifically configured to: when determining that the speech information obtained by listening matches predetermined wakeup speech information, determine that the speech information obtained by listening matches the speech wakeup model.

Optionally, the apparatus further includes:

-   -   an extraction module, configured to: when the determining module         802 determines that the speech information obtained by listening         matches predetermined wakeup speech information, extract a         voiceprint feature in a speech signal obtained by listening;         where     -   the determining module 802 is specifically configured to: when         determining that the extracted voiceprint feature matches a         predetermined voiceprint feature, determine that the speech         information obtained by listening matches the speech wakeup         model.

An embodiment of the present invention provides a speech recognition apparatus. As shown in FIG. 9 , the apparatus includes:

-   -   a receiving module 901, configured to receive a trigger signal         sent by a speech wakeup apparatus;     -   a sending module 902, configured to: after the receiving module         901 receives the trigger signal, enable itself and send a speech         prompt instruction to a user; and     -   a processing module 903, configured to record a speech signal         entered by the user according to the speech prompt instruction,         and recognize the speech signal, to obtain a recognition result.

By using solutions provided in this embodiment of the present invention, a user needs to send only one instruction, and requirements of the user can be met. In addition, the solutions are applicable regardless of whether a terminal is in a standby state or in a non-standby state.

In the following, embodiments of the present invention are specifically described with reference to a software implementation process, as shown in FIG. 10 .

From a perspective of software, a speech recognition module can be divided into a drive layer, an audio hardware abstraction layer (Audio HAL), a framework (Framework) layer, a speech recognition engine (VA Service), and application setting (Setting).

P1. Report an event. Specifically, the drive layer reports a trigger event to the Framework after receiving the trigger signal from a DSP.

P2. Report the event. Specifically, the Audio HAL reports the foregoing trigger event to the VA Service.

P3. Set a parameter. Specifically, it is set to read data from a buffer.

P4. Enable the VA Service.

P5. The VA Service sends an enable record instruction to the Framework.

P6. The Framework sends a read audio data instruction to the Audio HAL after receiving the enable record instruction.

P7. The Audio HAL enables reading for Buffer data after receiving the read audio data instruction sent by the Framework.

P8. The Audio HAL sends an obtain Buffer data instruction to a drive, so that the drive sends the obtain Buffer data instruction to the DSP, and then the DSP sends the Buffer data to the drive.

P9. The drive reports the received Buffer data to the VA Service.

P10. The VA Service performs recognition processing on the Buffer data and the record data.

P11. The VA Service sends a stop recording instruction to the Framework.

P12. The Framework sends a stop reading audio data instruction to the Audio HAL after receiving the stop recording instruction.

P13. The Audio HAL disables reading for the Buffer data after receiving the stop reading audio data instruction sent by the Framework.

P14. The Audio HAL sends a stop obtaining Buffer data instruction to the drive.

Persons skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may use a form of hardware only embodiments, software only embodiments, or embodiments with a combination of software and hardware. Moreover, the present invention may use a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, an optical memory, and the like) that include computer-usable program code.

The present invention is described with reference to the flowcharts and/or block diagrams of the method, the device (system), and the computer program product according to the embodiments of the present invention. It should be understood that computer program instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of a process and/or a block in the flowcharts and/or the block diagrams. These computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of any other programmable data processing device to generate a machine, so that the instructions executed by a computer or a processor of any other programmable data processing device generate an apparatus for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may be stored in a computer readable memory that can instruct the computer or any other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may be loaded onto a computer or another programmable data processing device, so that a series of operations and steps are performed on the computer or the another programmable device, thereby generating computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable device provide steps for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.

Although some embodiments of the present invention have been described, persons skilled in the art can make changes and modifications to these embodiments once they learn the basic inventive concept. Therefore, the following claims are intended to be construed as to cover the embodiments and all changes and modifications falling within the scope of the present invention.

Obviously, persons skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. The present invention is intended to cover these modifications and variations provided that they fall within the scope of protection defined by the following claims and their equivalent technologies. 

What is claimed is:
 1. A speech control method, applied to a terminal that includes a speech wakeup apparatus and a speech recognition apparatus, the method comprising: listening, by the speech wakeup apparatus, for first speech information in a surrounding environment, wherein the first speech information comprises wakeup information and a first portion of a command word, wherein the wakeup information is used to enable the speech recognition apparatus; generating, by the speech wakeup apparatus, a trigger signal based on determining that the wakeup information matches a speech wakeup model; sending, by the speech wakeup apparatus, the trigger signal to the speech recognition apparatus; enabling, by the speech wakeup apparatus, the speech recognition apparatus according to the trigger signal; listening, by the speech recognition apparatus, for second speech information, wherein the second speech information comprises a second portion of the command word; and obtaining, by the speech recognition apparatus, speech instruction information according to the first speech information and the second speech information, wherein the speech instruction information matches the command word, and the command word comprises the first portion of the command word and the second portion of the command word.
 2. The method according to claim 1, wherein the determining that the wakeup information matches the speech wakeup model comprises: in a case that the wakeup information matches predetermined wakeup speech information, determining that the wakeup information matches the speech wakeup model.
 3. The method according to claim 1, wherein the determining that the wakeup information matches the speech wakeup model comprises: in a case that the wakeup information matches predetermined wakeup speech information, extracting a voiceprint feature in the wakeup information, and in a case that the extracted voiceprint feature matches a predetermined voiceprint feature, determining that the wakeup information matches the speech wakeup model.
 4. The method according to claim 3, wherein the voiceprint feature includes one or more of the following features: a pitch contour, a linear prediction coefficient, a spectral envelope parameter, a harmonic energy ratio, a resonant peak frequency and its bandwidth, a cepstrum, or a Mel-frequency cepstrum coefficient.
 5. The method according to claim 1, wherein the obtaining, by the speech recognition apparatus, the speech instruction information according to the first speech information and the second speech information comprises: obtaining, by the speech recognition apparatus, a recognition result according to the first speech information and the second speech information, wherein the recognition result comprises command word information; and obtaining, by the speech recognition apparatus, the speech instruction information that matches the recognition result by matching between the obtained recognition result and pre-stored speech instruction information.
 6. The method according to claim 1, wherein the wakeup information is listened in a first period by the speech wakeup apparatus, and the first portion of the command word is listened in a second period by the speech wakeup apparatus; and wherein the second speech information is listened in a third period by the speech recognition apparatus.
 7. The method according to claim 1, wherein the listening, by the speech wakeup apparatus, for the first speech information in the surrounding environment comprises: listening for the first speech information in the surrounding environment in a standby state; or listening for the first speech information in the surrounding environment in a non-standby state; or listening for the first speech information in the surrounding environment in a screen-locked state.
 8. The method according to claim 1, further comprising: controlling, by the speech recognition apparatus, execution of an operation corresponding to the speech instruction information.
 9. The method according to claim 1, wherein the first portion of the command word is listened by the speech wakeup apparatus before the speech recognition apparatus is enabled.
 10. A terminal, comprising: a speech wakeup apparatus; and a speech recognition apparatus; wherein the speech wakeup apparatus is configured to: listen for first speech information in a surrounding environment, wherein the first speech information comprises a wakeup information and a first portion of a command word, wherein the wakeup information is used to enable the speech recognition apparatus; generate a trigger signal based on determining that the wakeup information matches a speech wakeup model; send the trigger signal to the speech recognition apparatus; and enable the speech recognition apparatus according to the trigger signal; and wherein the speech recognition apparatus is configured to: listen for second speech information, wherein the second speech information comprises a second portion of the command word; and obtain speech instruction information according to the first speech information and the second speech information, wherein the speech instruction information matches the command word, and the command word comprises the first portion of the command word and the second portion of the command word.
 11. The terminal according to claim 10, wherein the speech wakeup apparatus is configured to: in a case that the wakeup information matches predetermined wakeup speech information, extract a voiceprint feature in the wakeup information, and in a case that the extracted voiceprint feature matches a predetermined voiceprint feature, determine that the wakeup information matches a speech wakeup model.
 12. The terminal according to claim 11, wherein the voiceprint feature includes one or more of the following features: a pitch contour, a linear prediction coefficient, a spectral envelope parameter, a harmonic energy ratio, a resonant peak frequency and its bandwidth, a cepstrum, or a Mel-frequency cepstrum coefficient.
 13. The terminal according to claim 10, wherein the speech recognition apparatus is configured to: obtain a recognition result according to the first speech information and the second speech information, wherein the recognition result comprises command word information; and obtain the speech instruction information that matches the recognition result by matching between the obtained recognition result and pre-stored speech instruction information.
 14. The terminal according to claim 10, wherein the wakeup information is listened in a first period by the speech wakeup apparatus, and the first portion of the command word is listened in a second period by the speech wakeup apparatus; and wherein the second speech information is listened in a third period by the speech recognition apparatus.
 15. The terminal according to claim 10, wherein the speech wakeup apparatus is configured to: listen for the first speech information in the surrounding environment in a standby state; or listen for the first speech information in the surrounding environment in a non-standby state; or listen for the first speech information in the surrounding environment in a screen-locked state.
 16. The terminal according to claim 10, wherein the speech recognition apparatus is configured to: automatically disable when determining that speech information is not received again within a preset duration after enabling the speech recognition apparatus.
 17. The terminal according to claim 10, further comprising: a processor; wherein the speech recognition apparatus is also configured to send an execution instruction that matches the speech instruction information to the processor; and the processor is configured to execute an operation corresponding to the execution instruction.
 18. The terminal according to claim 10, wherein the speech wakeup apparatus is a digital signal processor (DSP), and the speech recognition apparatus is an application processor (AP).
 19. The terminal according to claim 10, wherein the first portion of the command word is listened by the speech wakeup apparatus before the speech recognition apparatus is enabled. 